import http from "@/utils/request";

export default {
    system: {
        list: {
            url: `/setting/config/list`,
            name: "配置列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        save: {
            url: `/setting/config/save`,
            name: "保存配置",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        lang: {
            url: `/setting/config/lang`,
            name: "设置语言",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
    },
    user: {
        list: {
            url: `/setting/user/list`,
            name: "用户列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        add: {
            url: `/setting/user/add`,
            name: "新增用户",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        edit: {
            url: `/setting/user/edit`,
            name: "编辑用户信息",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        state: {
            url: `/setting/user/state`,
            name: "更改用户状态",
            put: async function (data) {
                return await http.put(this.url, data);
            }
        },
        reset: {
            url: `/setting/user/reset`,
            name: "重置用户密码",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        delete: {
            url: `/setting/user/delete`,
            name: "删除用户信息",
            delete: async function (data) {
                return await http.delete(this.url, data);
            }
        }
    },
    dept: {
        list: {
            url: `/setting/dept/list`,
            name: "部门信息列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        add: {
            url: `/setting/dept/add`,
            name: "新增部门信息",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        edit: {
            url: `/setting/dept/edit`,
            name: "编辑部门信息",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        delete: {
            url: `/setting/dept/delete`,
            name: "删除部门信息",
            delete: async function (data) {
                return await http.delete(this.url, data);
            }
        }
    },
    role: {
        list: {
            url: `/setting/role/list`,
            name: "角色信息列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        auth: {
            url: `/setting/role/auth`,
            name: "角色权限列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        add: {
            url: `/setting/role/add`,
            name: "新增角色信息",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        edit: {
            url: `/setting/role/edit`,
            name: "编辑角色信息",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        allot: {
            url: `/setting/role/allot`,
            name: "分配角色权限",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        state: {
            url: `/setting/role/state`,
            name: "修改角色状态",
            put: async function (data) {
                return await http.put(this.url, data);
            }
        },
        delete: {
            url: `/setting/role/delete`,
            name: "删除角色信息",
            delete: async function (data) {
                return await http.delete(this.url, data);
            }
        }
    },
    menu: {
        list: {
            url: `/setting/menu/list`,
            name: "菜单信息列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        add: {
            url: `/setting/menu/add`,
            name: "新增菜单信息",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        edit: {
            url: `/setting/menu/edit`,
            name: "编辑菜单信息",
            post: async function (data) {
                return await http.post(this.url, data);
            }
        },
        sort: {
            url: `/setting/menu/sort`,
            name: "拖拽排序菜单",
            put: async function (data) {
                return await http.put(this.url, data);
            }
        },
        delete: {
            url: `/setting/menu/delete`,
            name: "删除菜单信息",
            delete: async function (data) {
                return await http.delete(this.url, data);
            }
        }
    },
};